Package: reprepro
Version: 4.2.0-1
Severity: wishlist
Tags: patch

Hello,

apt 0.8.5 added support for ButAutomaticUpgrades Release file field (bug
#596097 [1]). It would be great if reprepro supported this field as well.
0.8.6 has already migrated to Squeeze so it would be great if this feature
landed to Squeeze's reprepro as well.

The attached patch is based on the code used to support NotAutomatic in
reprepro. The patch is against current CVS. If you use this patch, you will
want to fix bug number in the changelog entry.

[1] http://bugs.debian.org/596097

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.36-rc6-amd64 (SMP w/4 CPU cores)
Locale: LANG=lt_LT.UTF-8, LC_CTYPE=lt_LT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages reprepro depends on:
ii  libarchive1             2.8.4-1          Single library to read/write tar, 
ii  libbz2-1.0              1.0.5-6          high-quality block-sorting file co
ii  libc6                   2.11.2-6         Embedded GNU C Library: Shared lib
ii  libdb4.8                4.8.30-2         Berkeley v4.8 Database Libraries [
ii  libgpg-error0           1.6-1            library for common error values an
ii  libgpgme11              1.2.0-1.2        GPGME - GnuPG Made Easy
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages reprepro recommends:
ii  apt                           0.8.7      Advanced front-end for dpkg

Versions of packages reprepro suggests:
ii  gnupg-agent       2.0.14-2               GNU privacy guard - password agent
pn  inoticoming       <none>                 (no description available)
pn  lzma              <none>                 (no description available)
ii  xz-utils          4.999.9beta+20100810-1 XZ-format compression utilities

-- no debconf information
Index: ChangeLog
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/ChangeLog,v
retrieving revision 1.507
diff -u -r1.507 ChangeLog
--- ChangeLog	15 Oct 2010 10:35:15 -0000	1.507
+++ ChangeLog	16 Oct 2010 11:33:32 -0000
@@ -1,3 +1,6 @@
+2010-10-16  Modestas Vainius <mo...@debian.org>
+	* add optional "ButAutomaticUpgrades" field for the
+	  distribution specification.
 2010-10-15
 	* add support for lzip compressed files
 	(Thanks to Daniel Baumann for the patch).
Index: NEWS
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/NEWS,v
retrieving revision 1.183
diff -u -r1.183 NEWS
--- NEWS	10 Jul 2010 11:44:56 -0000	1.183
+++ NEWS	16 Oct 2010 11:33:32 -0000
@@ -1,3 +1,7 @@
+Updates between 4.2.0 and 4.2.1:
+- support generation of the ButAutomaticUpgrades Release
+  file field (supported by apt since 0.8.5).
+
 Updates between 4.1.1 and 4.2.0:
 - allow patterns in override files
 - apply override files when doing 'pull' and 'update'
Index: distribution.c
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/distribution.c,v
retrieving revision 1.126
diff -u -r1.126 distribution.c
--- distribution.c	4 Jul 2010 12:25:00 -0000	1.126
+++ distribution.c	16 Oct 2010 11:33:32 -0000
@@ -52,6 +52,7 @@
 		free(distribution->version);
 		free(distribution->origin);
 		free(distribution->notautomatic);
+		free(distribution->butautomaticupgrades);
 		free(distribution->label);
 		free(distribution->description);
 		free(distribution->signwith);
@@ -387,6 +388,7 @@
 CFallSETPROC(distribution, version)
 CFallSETPROC(distribution, origin)
 CFallSETPROC(distribution, notautomatic)
+CFallSETPROC(distribution, butautomaticupgrades)
 CFtruthSETPROC2(distribution, readonly, readonly)
 CFallSETPROC(distribution, label)
 CFallSETPROC(distribution, description)
@@ -450,6 +452,7 @@
 	CF("Label",		distribution,	label),
 	CF("Log",		distribution,	logger),
 	CF("NotAutomatic",	distribution,	notautomatic),
+	CF("ButAutomaticUpgrades", distribution, butautomaticupgrades),
 	CF("Origin",		distribution,	origin),
 	CF("Pull",		distribution,	pulls),
 	CF("ReadOnly",		distribution,	readonly),
Index: distribution.h
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/distribution.h,v
retrieving revision 1.76
diff -u -r1.76 distribution.h
--- distribution.h	26 Jun 2010 10:58:41 -0000	1.76
+++ distribution.h	16 Oct 2010 11:33:32 -0000
@@ -35,7 +35,8 @@
 	 * generated, may be NULL. only suite is sometimes used
 	 * (and only for sanity checks) */
 	/*...@null@*/char *suite,*version;
-	/*...@null@*/char *origin,*label,*description,*notautomatic;
+	/*...@null@*/char *origin,*label,*description;
+	/*...@null@*/char *notautomatic,*butautomaticupgrades;
 	/* What architectures and components are there */
 	struct atomlist architectures, components;
 	/* which update rules to use */
Index: release.c
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/release.c,v
retrieving revision 1.113
diff -u -r1.113 release.c
--- release.c	10 Jul 2010 11:44:56 -0000	1.113
+++ release.c	16 Oct 2010 11:33:32 -0000
@@ -1131,6 +1131,7 @@
 	release_writeheader("Architecture",
 			atoms_architectures[target->architecture_atom]);
 	release_writeheader("NotAutomatic",distribution->notautomatic);
+	release_writeheader("ButAutomaticUpgrades",distribution->butautomaticupgrades);
 	release_writeheader("Description",distribution->description);
 #undef release_writeheader
 	r = release_finishfile(release, f);
@@ -1291,6 +1292,10 @@
 		writestring("\nNotAutomatic: ");
 		writestring(distribution->notautomatic);
 	}
+	if( distribution->butautomaticupgrades != NULL ) {
+		writestring("\nButAutomaticUpgrades: ");
+		writestring(distribution->butautomaticupgrades);
+	}
 	writechar('\n');
 
 	for( cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++ ) {
Index: debian/changelog
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/debian/changelog,v
retrieving revision 1.182
diff -u -r1.182 changelog
--- debian/changelog	15 Oct 2010 10:36:04 -0000	1.182
+++ debian/changelog	16 Oct 2010 11:33:32 -0000
@@ -1,7 +1,12 @@
 reprepro (4.2.1-0) UNRELEASED; urgency=low
 
+  [ Bernhard R. Link ]
   * add support for lzip compressed files (Closes: 600230)
 
+  [ Modestas Vainius ]
+  * support generation of the ButAutomaticUpgrades Release
+    file field (supported by apt since 0.8.5) (Closes: 60XXXX)
+
  -- Bernhard R. Link <brl...@debian.org>  Fri, 15 Oct 2010 12:11:23 +0200
 
 reprepro (4.2.0-1) unstable; urgency=low
Index: docs/manual.html
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/docs/manual.html,v
retrieving revision 1.31
diff -u -r1.31 manual.html
--- docs/manual.html	16 Feb 2010 15:49:44 -0000	1.31
+++ docs/manual.html	16 Oct 2010 11:33:32 -0000
@@ -528,7 +528,8 @@
 <tt class="header">Architectures</tt> (excluding a possible value "<tt>source</tt>"),
 <tt class="header">Components</tt>,
 <tt class="header">Description</tt>, and
-<tt class="header">NotAutomatic</tt>.
+<tt class="header">NotAutomatic</tt>,
+<tt class="header">ButAutomaticUpgrades</tt>.
 <h4><a name="compression">Choosing compression and file names</a></h4>
 Depending on the type of the index files, different files are generated.
 No specifying anything is equivalent to:
Index: docs/reprepro.1
===================================================================
RCS file: /cvsroot/mirrorer/mirrorer/docs/reprepro.1,v
retrieving revision 1.233
diff -u -r1.233 reprepro.1
--- docs/reprepro.1	15 Oct 2010 10:36:20 -0000	1.233
+++ docs/reprepro.1	16 Oct 2010 11:33:32 -0000
@@ -1108,6 +1108,13 @@
 though anything but \fByes\fP does make much
 sense right now.)
 .TP
+.B ButAutomaticUpgrades
+This optional field is simply copied into the
+Release files.
+(The value is handled as arbitrary string,
+though anything but \fByes\fP does make much
+sense right now.)
+.TP
 .B Description
 This optional field is simply copied into the
 Release files.

Reply via email to