Hi, On Fri, 26 Aug 2011, Salvatore Bonaccorso wrote: > But attached is an updated version for the patch, is this better > suitable so far? Jan, changed the parts you mentioned.
Yes, it's better but still two small points remain: > +static bool > +alternative_link_needs_update(const char *linkname, const char *target) > +{ > + char *lntarget; > + bool update_needed = true; > + struct stat st; > + > + if (lstat(linkname, &st) == 0) { > + if (S_ISLNK(st.st_mode)) { > + lntarget = xreadlink(linkname, false); > + if (strcmp(target, lntarget) == 0) { > + update_needed = false; > + } > + free(lntarget); > + } > + } Here you need: } else if (errno != ENOENT) { syserr(_("cannot stat file '%s'"), linkname); } > - if (alternative_can_replace_path(linkname)) { > + if (!alternative_link_needs_update(linkname,fn)) { ^missing space > + /* Link already correct, no update required */ > + } else if (alternative_can_replace_path(linkname)) { > /* Create alternative link. */ > xasprintf(&fntmp, "%s" DPKG_TMP_EXT, linkname); > checked_rm(fntmp); Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org