Bug 8816 - add WARNING to debian/control file, to not manually edit
Summary: add WARNING to debian/control file, to not manually edit
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 12:01 UTC by Mason James
Modified: 2014-05-26 21:04 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
A patch (1.63 KB, patch)
2013-03-25 04:27 UTC, Aaron Wells
Details | Diff | Splinter Review
Bug 8816: Add warning about manual edits to top of debian/control (1.71 KB, patch)
2013-03-26 07:09 UTC, Mason James
Details | Diff | Splinter Review
Bug 8816: Add warning about manual edits to top of debian/control (2.91 KB, patch)
2013-03-26 18:48 UTC, Mason James
Details | Diff | Splinter Review
[PASSED QA] Bug 8816: Add warning about manual edits to top of debian/control (1.77 KB, patch)
2013-03-30 23:38 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2012-09-25 12:01:39 UTC
many people manually edit the debian/control file, not realising that it is auto-generated, (and their changes will be lost)

a warning message in the file, would stop people making this mistake
Comment 1 Aaron Wells 2013-03-25 04:27:40 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2013-03-25 09:07:45 UTC
This looks totally safe to me. As it's not really essential, I'll let it go through the normal signoff process unless the RM feels like pushing it through.
Comment 3 Mason James 2013-03-26 07:09:15 UTC Comment hidden (obsolete)
Comment 4 Mason James 2013-03-26 18:41:51 UTC
(In reply to comment #2)
> This looks totally safe to me. As it's not really essential, I'll let it go
> through the normal signoff process unless the RM feels like pushing it
> through.

hmm, #comment lines seem to cause a parsing error, and make  Parse::Deb::Control barf

"Field names must not begin with the comment character, #."
 http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-controlsyntax

i'll send a patch to fix
Comment 5 Mason James 2013-03-26 18:48:05 UTC Comment hidden (obsolete)
Comment 6 Mason James 2013-03-26 19:11:12 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > This looks totally safe to me. As it's not really essential, I'll let it go
> > through the normal signoff process unless the RM feels like pushing it
> > through.
> 
> hmm, #comment lines seem to cause a parsing error

oops, my bad

the #comment lines are ok after all, i'll revert my new patch
Comment 7 Mason James 2013-03-26 19:12:17 UTC
Comment on attachment 16901 [details] [review]
Bug 8816: Add warning about manual edits to top of debian/control

>From 58ee3231373b451f433d61befa41b45f5e4704ac Mon Sep 17 00:00:00 2001
>From: Mason James <mtj@kohaaloha.com>
>Date: Wed, 27 Mar 2013 07:44:55 +1300
>Subject: [PATCH] Bug 8816: Add warning about manual edits to top of debian/control
>Content-Type: text/plain; charset="utf-8"
>
>And we need to add it to control.in as well, because control is
>created from control.in (which is the whole point of the warning ;)
>---
> debian/control    |   17 ++++++++++++-----
> debian/control.in |   13 ++++++++-----
> 2 files changed, 20 insertions(+), 10 deletions(-)
>
>diff --git a/debian/control b/debian/control
>index be19e0c..b8e827c 100644
>--- a/debian/control
>+++ b/debian/control
>@@ -3,9 +3,16 @@ Maintainer: Robin Sheat <robin@catalyst.net.nz>
> Section: web
> Priority: optional
> Standards-Version: 3.8.4
>-# NOTA BENE: Build dependencies end up as runtime dependencies as well.
>-# See debian/rules, the override_dh_gencontrol rules. 
>-# There are some exceptions.
>+XBC-Comment: WARNING: The "control" file is manually generated from the "control.in" file.
>+ Do not manually edit "control" or your changes will be clobbered when you
>+ run update-control
>+ NOTA BENE: Build dependencies end up as runtime dependencies as well.
>+ See debian/rules, the override_dh_gencontrol rules.
>+ There are some exceptions.
>+Build-Depends:__AUTODEPENDS__,
>+ debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl,
>+ libxml2-utils
>+
> Build-Depends: libalgorithm-checkdigits-perl,
>  libanyevent-http-perl,
>  libanyevent-perl,
>@@ -111,7 +118,7 @@ Build-Depends: libalgorithm-checkdigits-perl,
>  libyaml-perl,
>  libyaml-syck-perl,
>  perl,
>- perl-modules, 
>+ perl-modules,
>  debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl,
>  libxml2-utils
> 
>@@ -130,7 +137,7 @@ Depends: ${misc:Depends}, ${koha:Depends},
>  perl-doc,
>  pwgen,
>  sudo,
>- tinymce2, 
>+ tinymce2,
>  unzip,
>  xmlstarlet,
>  yaz
>diff --git a/debian/control.in b/debian/control.in
>index a30aeed..b84c040 100644
>--- a/debian/control.in
>+++ b/debian/control.in
>@@ -3,10 +3,13 @@ Maintainer: Robin Sheat <robin@catalyst.net.nz>
> Section: web
> Priority: optional
> Standards-Version: 3.8.4
>-# NOTA BENE: Build dependencies end up as runtime dependencies as well.
>-# See debian/rules, the override_dh_gencontrol rules. 
>-# There are some exceptions.
>-Build-Depends:__AUTODEPENDS__, 
>+XBC-Comment: WARNING: The "control" file is manually generated from the "control.in" file.
>+ Do not manually edit "control" or your changes will be clobbered when you
>+ run update-control
>+ NOTA BENE: Build dependencies end up as runtime dependencies as well.
>+ See debian/rules, the override_dh_gencontrol rules.
>+ There are some exceptions.
>+Build-Depends:__AUTODEPENDS__,
>  debhelper (>= 7.0.50), gettext, python, python-debian, xsltproc, docbook-xsl,
>  libxml2-utils
> 
>@@ -25,7 +28,7 @@ Depends: ${misc:Depends}, ${koha:Depends},
>  perl-doc,
>  pwgen,
>  sudo,
>- tinymce2, 
>+ tinymce2,
>  unzip,
>  xmlstarlet,
>  yaz
>-- 
>1.7.2.5
Comment 8 Katrin Fischer 2013-03-30 23:38:13 UTC
Created attachment 17068 [details] [review]
[PASSED QA] Bug 8816: Add warning about manual edits to top of debian/control

And we need to add it to control.in as well, because control is
created from control.in (which is the whole point of the warning ;)

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds comments with a warning.
Comment 9 Jared Camins-Esakov 2013-03-31 00:43:39 UTC
This patch has been pushed to master.

Welcome, Aaron, you're the 207th person to have a patch committed to Koha.
Comment 10 Chris Cormack 2013-04-24 21:43:08 UTC
This was pushed to 3.10.x and released in 3.10.5