diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-dev/2011-June/005495.html | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-dev/2011-June/005495.html')
-rw-r--r-- | zarb-ml/mageia-dev/2011-June/005495.html | 174 |
1 files changed, 174 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/2011-June/005495.html b/zarb-ml/mageia-dev/2011-June/005495.html new file mode 100644 index 000000000..30cb5291b --- /dev/null +++ b/zarb-ml/mageia-dev/2011-June/005495.html @@ -0,0 +1,174 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-dev] get-skype package for submission + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20get-skype%20package%20for%20submission&In-Reply-To=%3C4DF60195.3020401%40iki.fi%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="005928.html"> + <LINK REL="Next" HREF="005525.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-dev] get-skype package for submission</H1> + <B>Anssi Hannula</B> + <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20get-skype%20package%20for%20submission&In-Reply-To=%3C4DF60195.3020401%40iki.fi%3E" + TITLE="[Mageia-dev] get-skype package for submission">anssi.hannula at iki.fi + </A><BR> + <I>Mon Jun 13 14:24:53 CEST 2011</I> + <P><UL> + <LI>Previous message: <A HREF="005928.html">[Mageia-dev] get-skype package for submission +</A></li> + <LI>Next message: <A HREF="005525.html">[Mageia-dev] get-skype package for submission +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#5495">[ date ]</a> + <a href="thread.html#5495">[ thread ]</a> + <a href="subject.html#5495">[ subject ]</a> + <a href="author.html#5495">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>On 12.06.2011 02:37, Barry Jackson wrote: +><i> On 11/06/11 18:03, Anssi Hannula wrote: +</I>>><i> +</I>>><i> - Best to add a comment in the %post script to remind that any new files +</I>>><i> need to have a %ghost entry created. +</I>>><i> (btw: an alternative idea is to create a post-script and the filelist +</I>>><i> at the same time in a single for loop in %build/%install, so that +</I>>><i> the lists can never get out of sync as they are created from a single +</I>>><i> list; however, your current solution is adequate as well) +</I>><i> +</I>><i> Note added - keep it simple. +</I>><i> +</I> +You added the note in the %files section, not in %post. The issue only +happens if someone updates %post but not %files, so it doesn't make +sense to put the reminder in %files :) + +>><i> - You don't check for failures. If the mktemp call fails, you extract +</I>>><i> the tarball into /root etc.etc.. You need to check for failures on +</I>>><i> the mktemp/mkdir/cd commands (mktemp failure can be detected by +</I>>><i> checking if $newtmp string is empty), or alternatively run "set -e" +</I>>><i> to make the shell exit on failures (this leaves the tmpdir polluted, +</I>>><i> but it doesn't matter as much as it is an uncommon failure case and +</I>>><i> /tmp is cleaned periodically anyway). +</I>><i> +</I>><i> Added some checks - with clean-up of previously created dirs etc on fail. +</I> +><i> mkdir %{mytmp} +</I>><i> [[ -d %{mytmp} ]] || exit 1 +</I>><i> cd %{mytmp} +</I> +cd is not guaranteed to work even if %mytmp exists. Add "|| exit 1". + +><i> cd ${tmpextdir} +</I>><i> tar jxf %{mytmp}/skype-%{version}.tar.bz2 +</I> +Same here... + +Well, actually these two aren't that serious, since they can't be +exploited by non-root anyway. I'm somewhat ok with them, as long as your +mentor is as well and no one else objects. + +Note that your "if ! [[ -d %{tmpdir} ]]; then" check is not 100% +necessary, as %tmpdir not existing is unlikely and causes no side effects. + +Other nits: +- Use better variable names- %mytmp, $tmpextdir, %tmpdir are confusing. +- The description starts with an empty line. Remove it. + +-- +Anssi Hannula +</PRE> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="005928.html">[Mageia-dev] get-skype package for submission +</A></li> + <LI>Next message: <A HREF="005525.html">[Mageia-dev] get-skype package for submission +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#5495">[ date ]</a> + <a href="thread.html#5495">[ thread ]</a> + <a href="subject.html#5495">[ subject ]</a> + <a href="author.html#5495">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev +mailing list</a><br> +</body></html> |