Package: reprepro
Version: 4.2.0-2
Tags: patch

Hi,

When copying a bunch of packages from a -development codename into the release codename (our mass-rebuild infrastructure adds a new binNMU tag to indicate the rebuild for the .debs, but just includes the same source package), I ran into a number of warnings of the form "downgrading 'foo' from '1.1.4' to '1.1.4'". These warnings should not be emitted -- they make it hard to tell if any actual downgrades happened.

It looks like the reason for these warnings is the codepath to give the warning is the same as the codepath to skip inclusion if the package already exists at a higher version. That code path wants less-than-or-equal, but the warning should only be given for strictly-less-than. Something like the following patch should address this. There are also two test cases that assume the current behavior (testsnapshotcopyrestore.sh and testcopy.sh) that will need to be addressed.

Another option would be to split up the conditional into three cases, and not bother copying the package but also not warn when the source and target versions are the same.

--- reprepro-4.2.0.orig/target.c
+++ reprepro-4.2.0/target.c
@@ -467,7 +467,7 @@ retvalue target_addpackage(struct target
                        } else {
                                if( versioncmp <= 0 ) {
                                        /* new Version is not newer than old 
version */
-                                       if( downgrade ) {
+                                       if( downgrade && versioncmp < 0 ) {
                                                fprintf(stderr,"Warning: downgrading 
'%s' from '%s' to '%s' in '%s'!\n",name,oldpversion,version,target->identifier);
                                        } else {
                                                fprintf(stderr,"Skipping inclusion of 
'%s' '%s' in '%s', as it has already 
'%s'.\n",name,version,target->identifier,oldpversion);

Thanks,
--
Geoffrey Thomas
geo...@mit.edu



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to