Josh Triplett <josh@joshtriplett.org> (30/07/2012):
> As discussed with Adam Barratt via #debian-release, -2 just adds a
> single patch from upstream to fix bug 662087.
>
> debdiff:
>
> diff -u htop-1.0.1/debian/changelog htop-1.0.1/debian/changelog
> --- htop-1.0.1/debian/changelog
> +++ htop-1.0.1/debian/changelog
> @@ -1,3 +1,11 @@
> +htop (1.0.1-2) unstable; urgency=low
> +
> + * debian/patches:
> + - New patch 200-dont-delete-htoprc-if-symlink.patch from upstream VCS.
> + (Closes: #662087)
> +
> + -- Eugene V. Lyubimkin <jackyf@debian.org> Mon, 30 Jul 2012 19:12:16 +0300
> +
> htop (1.0.1-1) unstable; urgency=low
>
> * New upstream release.
> diff -u htop-1.0.1/debian/patches/series htop-1.0.1/debian/patches/series
> --- htop-1.0.1/debian/patches/series
> +++ htop-1.0.1/debian/patches/series
> @@ -1,2 +1,3 @@
> +200-dont-delete-htoprc-if-symlink.patch
> 600-openvz-veid-on-kernels-gt-2.6.18.patch
> 700-ltrace-support.patch
> only in patch2:
> unchanged:
> --- htop-1.0.1.orig/debian/patches/200-dont-delete-htoprc-if-symlink.patch
> +++ htop-1.0.1/debian/patches/200-dont-delete-htoprc-if-symlink.patch
> @@ -0,0 +1,17 @@
> +Taken from upstream: http://htop.svn.sourceforge.net/viewvc/htop/trunk/Settings.c?view=patch&r1=286&r2=285&pathrev=286
> +
> +Don't delete an old .htoprc if it's a symlink.
> +
> +--- trunk/Settings.c 2012/02/17 13:45:58 285
> ++++ trunk/Settings.c 2012/03/05 11:12:58 286
> +@@ -239,7 +239,9 @@
> + mkdir(htopDir, 0700);
> + free(htopDir);
> + free(configDir);
> +- if (access(legacyDotfile, R_OK) != 0) {
> ++ struct stat st;
> ++ lstat(legacyDotfile, &st);
No error checking here…
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is
set appropriately.
What does S_ISLNK() do when an error was reached?
Surely that could be improved?
> ++ if (access(legacyDotfile, R_OK) != 0 || S_ISLNK(st.st_mode)) {
> + free(legacyDotfile);
> + legacyDotfile = NULL;
> + }
Mraw,
KiBi.
Attachment:
signature.asc
Description: Digital signature