matched as a string.
Signed-off-by: lolilolicon
---
scripts/makepkg.sh.in |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 86e74a6..cc06baa 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -414,7 +414,7
Always quote the righthand side of expression when the == or != operator
is used, unless intended as a pattern.
Also, remove unnecessary quoting in variable assignments.
Signed-off-by: lolilolicon
---
scripts/pkgdelta.sh.in | 18 +-
1 files changed, 9 insertions(+), 9
Allow leading zeros, but always treat it as decimal.
Also quote right side of [[ expression ]] when the != or == operator is
used, unless a pattern is intended.
Signed-off-by: lolilolicon
---
contrib/paccache.in |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a
On Thu, Sep 29, 2011 at 1:12 AM, Martti Kühne wrote:
> On Wed, Sep 28, 2011 at 6:58 PM, lolilolicon wrote:
>
>> Also, remove unnecessary quoting in variable assignments.
>>
>
> actually, this one is being discouraged by #bash/wooledge.org, in
> favor of consiste
On Thu, Sep 29, 2011 at 2:07 AM, Dan McGee wrote:
> On Wed, Sep 28, 2011 at 11:58 AM, lolilolicon wrote:
>> Always quote the righthand side of expression when the == or != operator
>> is used, unless intended as a pattern. Quoting bash(1):
>>
>> When the == and != ope
On Thu, Sep 29, 2011 at 1:52 AM, Dave Reisner wrote:
> On Thu, Sep 29, 2011 at 12:58:59AM +0800, lolilolicon wrote:
>> Allow leading zeros, but always treat it as decimal.
>
> If this was your goal, you missed. 'keep' is declared with an integer
> attribute meaning tha
Always quote the right-hand side of expression when the == or != operator
is used, unless intended as a pattern.
Signed-off-by: lolilolicon
---
scripts/pkgdelta.sh.in |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in
onsume a huge amount
of resources with input such as '2**2**32' or immediately produce an error
on invalid input. Instead, we simply 'declare -- keep' and avoid all that.
Signed-off-by: lolilolicon
---
contrib/paccache.in |8 +---
1 files changed, 5 insertions(
Declare and initialize integer variables 'needsroot' and 'verbose'.
Don't use the fact that (( undefined_variable )) evaluates to 0.
Signed-off-by: lolilolicon
---
contrib/paccache.in |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cont
Always quote the right-hand side of expression when the == or != operator
is used, unless intended as a pattern.
Signed-off-by: lolilolicon
---
contrib/paccache.in |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/paccache.in b/contrib/paccache.in
index e5cac7d
On Thu, Sep 29, 2011 at 10:45 AM, lolilolicon wrote:
> Verify the argument to -k is a non-negative integer. Leading zeros
> are simply tripped.
>
Oops, sorry s/tripped/stripped/ there.
Dave, will you correct this typo for me, or should I resend the patch?
May I ask how should I re
Use globbing and store the expansion results in an array.
The [epoch:]pkgver part can start without an integer, e.g. lshw is
currently at version B.02.15.
extglob is just good enough to match pkgname-[epoch:]pkgver-pkgrel.
Set nullglob globally.
Signed-off-by: lolilolicon
---
contrib/bacman.in
Simply `eval'ing configurations from pacman.conf is really bad practice.
Use proper string parsing instead. The parser implemented here aborts
as soon as it gets the first assignment, being consistent with pacman.
Signed-off-by: lolilolicon
---
contrib/bacman.in |
Signed-off-by: lolilolicon
---
contrib/bacman.in | 10 +-
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/contrib/bacman.in b/contrib/bacman.in
index 0069d1e..d43bf78 100755
--- a/contrib/bacman.in
+++ b/contrib/bacman.in
@@ -58,7 +58,7 @@ if [ $EUID -gt 0 ]; then
The original regex is also not accurate (should be ^[A-Z]+$).
Signed-off-by: lolilolicon
---
contrib/bacman.in |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/bacman.in b/contrib/bacman.in
index d43bf78..c69ab6f 100755
--- a/contrib/bacman.in
+++ b/contrib
Doing so is certainly better, but we really should consider reusing
write_pkginfo() from makepkg. Splitting common functions from makepkg
into a library would be nice.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 34 +-
1 files changed, 17 insertions
ff-by: lolilolicon
---
contrib/bacman.in | 30 +++---
1 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/contrib/bacman.in b/contrib/bacman.in
index a28f8e7..ec953ce 100755
--- a/contrib/bacman.in
+++ b/contrib/bacman.in
@@ -77,14 +77,14 @@ fi
# parse val
On Fri, Sep 30, 2011 at 1:14 AM, lolilolicon wrote:
> +# parse value of simple, non-repeating variable assignment
> +conf_var_val() {
> + local var=${1//\//\\/}
> + awk '
> + /^[ \t]*'"${var}"'[ \t]*=/ {
> + sub(/[^=
pport
.tar.Z archive creation.
Signed-off-by: lolilolicon
---
scripts/makepkg.sh.in | 107 ++--
1 files changed, 40 insertions(+), 67 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 86e74a6..75c3730 100644
--- a/scripts
On Fri, Sep 30, 2011 at 1:27 AM, Dave Reisner wrote:
> On Fri, Sep 30, 2011 at 01:14:03AM +0800, lolilolicon wrote:
>>
>> Signed-off-by: lolilolicon
>> ---
>> contrib/bacman.in | 10 +-
>> 1 files changed, 5 insertions(+), 5 deletions(-)
>>
>
On Fri, Sep 30, 2011 at 1:40 AM, Dave Reisner wrote:
> On Fri, Sep 30, 2011 at 01:23:37AM +0800, lolilolicon wrote:
>> Introduce ext_to_tar_opt() to unify package and source package tarball
>> creation. This requires bsdtar to support the compression options -z,
>> -j, -J a
On Fri, Sep 30, 2011 at 1:52 AM, Dan McGee wrote:
>
> Until you teach bsdtar to not store a new gzip timestamp each time it
> creates a package (and thus makes packaging actually produce the same
> package every time), this patch totally breaks lessons we learned 2
> and a half years ago.
>
> -Dan
le is created.
Also retire the obsolete $EXT variable.
Also add the obligatory comment why we don't use bsdtar's compression.
Signed-off-by: lolilolicon
---
scripts/makepkg.sh.in | 26 ++
1 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/scripts/
Also address an uninitialized use of $ret.
---
scripts/makepkg.sh.in |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d426661..8f76656 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1332,6 +1332,7
On Fri, Sep 30, 2011 at 2:20 PM, Allan McRae wrote:
> On 30/09/11 15:23, lolilolicon wrote:
>> bsdtar -cf - $comp_files * |
>> case "$PKGEXT" in
>> - *tar.gz) gzip -c -f -n ;;
>> - *tar.bz2) bzip2 -c -f
On Fri, Sep 30, 2011 at 2:18 PM, Allan McRae wrote:
> On 30/09/11 15:30, lolilolicon wrote:
>>
>> Also address an uninitialized use of $ret.
>> ---
>> scripts/makepkg.sh.in | 6 +-
>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>
>>
SRCEXT should allow whatever PKGEXT does.
Also address an uninitialized use of $ret.
Signed-off-by: lolilolicon
---
scripts/makepkg.sh.in |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 213ac32..ebb62d8 100644
--- a
bed in the commit message.
If we agree on this change, feel free to port our scripts to use this.
lolilolicon (1):
scripts/library: add config_parser.sh
scripts/library/README |3 ++
scripts/library/config_parser.sh | 56 ++
2 files changed, 59 i
y_set() both read config file from stdin,
instead of $1.
Signed-off-by: lolilolicon
---
scripts/library/README |3 ++
scripts/library/config_parser.sh | 56 ++
2 files changed, 59 insertions(+), 0 deletions(-)
create mode 100644 scripts/li
y_set() both read config file from stdin,
instead of $1.
Signed-off-by: lolilolicon
---
scripts/library/README |3 ++
scripts/library/config_parser.sh | 56 ++
2 files changed, 59 insertions(+), 0 deletions(-)
create mode 100644 scripts/li
On Fri, Sep 30, 2011 at 8:12 PM, Dave Reisner wrote:
> On Fri, Sep 30, 2011 at 07:37:48PM +0800, lolilolicon wrote:
>> config_parser.sh provides functions to support parsing simple config
>> files, pacman.conf in particular. Our scripts should never use a
>> simple eval to g
On Fri, Sep 30, 2011 at 10:55 PM, Dan McGee wrote:
> On Fri, Sep 30, 2011 at 1:34 AM, lolilolicon wrote:
>> On Fri, Sep 30, 2011 at 2:20 PM, Allan McRae wrote:
>>> On 30/09/11 15:23, lolilolicon wrote:
>>>> bsdtar -cf - $comp_files * |
On Fri, Sep 30, 2011 at 11:03 PM, Dan McGee wrote:
> On Fri, Sep 30, 2011 at 7:12 AM, Dave Reisner wrote:
>> At the risk of painting my shed green, I dislike your naming convention,
>> particularly conf_key_set, which doesn't set anything at all. I would
>> have thought that something such as the
read config file from stdin, which
makes chaining a breeze.
Signed-off-by: lolilolicon
---
scripts/library/README |3 +
scripts/library/config_parser.sh | 106 ++
2 files changed, 109 insertions(+), 0 deletions(-)
create mode 100644 scripts/li
On Sat, Oct 1, 2011 at 3:01 AM, lolilolicon wrote:
> config_parser.sh provides functions to support parsing simple config
> files, pacman.conf for example. Our scripts should never use a dirty
> eval to get config values such as DBPath.
>
> conf_key_get_val() is modified fr
le is created.
Also retire the obsolete $EXT variable.
Also add the obligatory comment why we don't use bsdtar's compression.
Finally, fix mixed-tab-space indentation.
Signed-off-by: lolilolicon
---
scripts/makepkg.sh.in | 26 ++
1 files changed, 10 insertions(+
As every piece of code in the whole project uses TAB as indentation
character, bacman shouldn't be an exception.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 278 ++---
1 files changed, 138 insertions(+), 140 deletions(-)
diff --
Another style change. The [[ expression ]] form is particularly
cleaner, safer and more powerful than the [ expression ] form.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 44 ++--
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a
This includes:
- Quoting fixes.
- Drop deprecated mktemp option -p.
- Set extglob nullglob shell options at the top.
- Use extended globbing instead of regex to match %HEADER% in pacman db.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 21 +++--
1 files changed, 11
bacman should support whatever makepkg does as PKGEXT.
Also remove obsolete $EXT variable.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 12 +++-
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/contrib/bacman.in b/contrib/bacman.in
index 63bd511..1bb7dc6 100755
and foo-3g, even if everything else is perfect, the code
will match two directories.
Don't make assumptions, use what is known.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 14 +++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/contrib/bacman.in b/
This includes:
- Quoting fixes.
- Drop deprecated mktemp option -p.
- Set extglob nullglob shell options at the top.
- Use extended globbing instead of regex to match %HEADER% in pacman db.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 21 +++--
1 files changed, 11
On Tue, Oct 4, 2011 at 9:08 PM, Nico Schottelius
wrote:
> Hello .*,
>
> This is a resent from the discussion from Mon, 14 Jun 2010 14:26:50 +0200,
> which seems never to get through to get applied.
>
> Can you check && apply?
>
> Cheers,
>
> Nico
>
> From: Nico Schottelius
>
> Signed-off-by: Nico
On Thu, Oct 6, 2011 at 2:00 PM, Dan McGee wrote:
> $ git am -3 -s < /tmp/bacman-code-cleanup.patch
> Applying: bacman: small code cleanup
> fatal: sha1 information is lacking or useless (contrib/bacman.in).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three
As every piece of code in the whole project uses TAB as indentation
character, bacman shouldn't be an exception.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 278 ++---
1 files changed, 138 insertions(+), 140 deletions(-)
diff --
Another style change. The [[ expression ]] form is particularly
cleaner, safer and more powerful than the [ expression ] form.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 44 ++--
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a
This includes:
- Quoting fixes.
- Drop deprecated mktemp option -p.
- Set extglob nullglob shell options at the top.
- Use extended globbing instead of regex to match %HEADER% in pacman db.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 21 +++--
1 files changed, 11
bacman should support whatever makepkg does as PKGEXT.
Also remove obsolete $EXT variable.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 12 +++-
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/contrib/bacman.in b/contrib/bacman.in
index 89d7f61..adc2cb3 100755
On Thu, Oct 6, 2011 at 2:14 PM, Dan McGee wrote:
> On Thu, Oct 6, 2011 at 1:11 AM, lolilolicon wrote:
>> On Thu, Oct 6, 2011 at 2:00 PM, Dan McGee wrote:
>>> $ git am -3 -s < /tmp/bacman-code-cleanup.patch
>>> Applying: bacman: small code cleanup
>>>
and foo-3g, even if everything else is perfect, the code
will match two directories.
Don't make assumptions, use what is known.
Signed-off-by: lolilolicon
---
contrib/bacman.in | 14 +++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/contrib/bacman.in b/
---
contrib/PKGBUILD.vim |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim
index 1814c22..4d69e4d 100644
--- a/contrib/PKGBUILD.vim
+++ b/contrib/PKGBUILD.vim
@@ -220,6 +220,9 @@ hi def link pb_k_pkgrel pbKeywords
hi def link pb
On Thu, Oct 20, 2011 at 3:55 AM, Dave Reisner wrote:
> On Wed, Oct 19, 2011 at 09:37:22PM +0200, Markus Jochim wrote:
>> Dear developers,
>>
>> I'd like to request a feature. When I search for some package, let's
>> say openconnect:
>>
>> $ pacman -Ss openconnect (or -Qs)
>>
>> it takes quite a wh
pkgrel, as with pkgver, simply mustn't contain hyphens.
Signed-off-by: lolilolicon
---
contrib/bacman.in |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/bacman.in b/contrib/bacman.in
index 9636091..c55d716 100755
--- a/contrib/bacman.in
+++ b/contrib/bacm
On Tue, Jan 17, 2012 at 8:24 AM, Alexander Rødseth wrote:
> Hi,
>
> I understand that case sensitivity can, perhaps, bring clarity for
> configuration values like ILoveCandy, but IMO, both "Never" and
> "never" should be allowed, as the uppercase letters bring no more
> clarity, but add an additio
On Wed, Jan 18, 2012 at 4:37 AM, Alexander Rødseth wrote:
>> This distinction is good and increases clarity.
>
> Here I disagree, as I think requiring "never" to be written as "Never"
> is a form of noise. I think it's equally clear to allow "Never" to be
> written as "never", while having the add
Allan McRae wrote:
> On 04/08/13 02:26, Dave Reisner wrote:
>> + if [[ $1 = ?(_[[:alpha:]])+([[:alnum:]_])?(+)=* ]]; then
>
> This matches "1=2" which then bails on the export. Should it be:
>
> +(_[[:alpha:]])?([[:alnum:]_])?(+)=*
>
There must be a typo, I think it should be this:
[_[:alp
On Mon, Aug 5, 2013 at 11:30 AM, lolilolicon wrote:
>
> There must be a typo, I think it should be this:
>
> [_[:alpha]]*([_[:alnum:]])?(+)
Uh, what did I say? There must be a typo!
[_[:alpha:]]*([_[:alnum:]])?(+)
>
> which also allows setting the special shell variable $_ but maybe it's fine.
On Tue, Jul 16, 2013 at 8:22 PM, Allan McRae wrote:
> Signed-off-by: Allan McRae
> ---
> scripts/pacman-db-upgrade.sh.in | 46
> -
> 1 file changed, 36 insertions(+), 10 deletions(-)
>
> diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upg
On Mon, May 12, 2014 at 10:47 AM, Michael Witten wrote:
> In `makepkg' (that is, in `scripts/makepkg.sh.in'), the following exist:
>
> local provides_list=()
> eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | \
> sed -e "s/provides=/provides_list+=/" -e "s/
On Tue, May 13, 2014 at 1:43 AM, Dave Reisner wrote:
> On Mon, May 12, 2014 at 01:06:20PM +0800, lolilolicon wrote:
>>
>> These are in the check_sanity function, by the time which is run we
>> already source'd the BUILDFILE, correct? Why don't we use the e
On Tue, May 13, 2014 at 1:18 PM, lolilolicon wrote:
> Anyway, maybe we can ask bash to pre-formalize the PKGBUILD a little
> bit so be can parse it more confidently com, by using abination of
> `set -x` and `typeset`.
don't know how it got messed up there, should have be
On Tue, May 13, 2014 at 8:51 PM, Dave Reisner wrote:
> On Tue, May 13, 2014 at 01:18:33PM +0800, lolilolicon wrote:
>> On Tue, May 13, 2014 at 1:43 AM, Dave Reisner wrote:
>> > On Mon, May 12, 2014 at 01:06:20PM +0800, lolilolicon wrote:
>> >>
>> >> Thes
On Wed, May 14, 2014 at 3:01 AM, Connor Behan wrote:
> On 12/05/14 10:25 PM, lolilolicon wrote:
>> On Tue, May 13, 2014 at 1:18 PM, lolilolicon
>> wrote:
>>> Anyway, maybe we can ask bash to pre-formalize the PKGBUILD a little
>>> bit so be can parse it more co
On Wed, May 14, 2014 at 1:02 PM, lolilolicon wrote:
>
> Wow, that was long ago. I don't think anyone has requested that, but
> there don't seem to be a case for it either. There probably is no way
> to separate variable assignments out cleanly from the soup, because
> va
Something like `source=('$pkgname-$pkgver.tar.gz')` in the PKGBUILD
would "just work" with this eval. This could be a security issue since
URLs are arbitrary external data.
Instead, expand the dlagent command line into an array, replace the %o,
%u place holders, and run the resultant command line
Something like `source=('$pkgname-$pkgver.tar.gz')` in the PKGBUILD
would "just work" with this eval. This could be a security issue since
URLs are arbitrary input. This also violated the principle of least
surprise.
Instead, expand the dlagent command line into an array, replace the %o,
%u place
On Sat, Sep 6, 2014 at 3:35 AM, Dave Reisner wrote:
> On Sat, Sep 06, 2014 at 01:30:54AM +0800, lolilolicon wrote:
>> Something like `source=('$pkgname-$pkgver.tar.gz')` in the PKGBUILD
>> would "just work" with this eval. This could be a security issue since
This eval enables the following in a PKGBUILD to "just work":
source=('$pkgname-$pkgver.tar.gz'::'https://host/$pkgver.tar.gz')
This has at least two problems:
- It violated the principle of least surprise.
- It could be a security issue since URLs are arbitrary input.
Instead, expand the dla
On Sun, Oct 23, 2016 at 11:37 AM, Allan McRae wrote:
> What can we conclude from this?
>
> 1) no operation reads a single "desc" file
> 2) -Qo is the only operation to gain from efficient reading of all
> "files" files. (-Ql may also gain, but is probably output bound)
> 3) having "desc" and "fil
69 matches
Mail list logo