Your message dated Mon, 22 Apr 2013 17:55:02 -0400
with message-id <[email protected]>
and subject line Re: Bug#705322: mr: The order that files are included in 
.mrconfig matters
has caused the Debian Bug report #705322,
regarding mr: The order that files are included in .mrconfig matters
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
705322: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705322
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mr
Version: 1.14
Severity: normal

Dear Maintainer,

   I've created a repo with a working example:
      https://github.com/resuscv/bug-reports.git

   This document repeats the following email text:
      https://github.com/resuscv/bug-reports/blob/master/bug-1-mr.md

### Issue: The order that files are included in .mrconfig matters

tl;dr - Changing the order that files are included in *.mrconfig* will 
mean that *lib = ...* defines will be lost.

* mr version: fa1f7770c9  (Log: releasing version 1.14)

- This bug report repository: https://github.com/resuscv/bug-reports
- Revisions:
  1. 980d95fe55
  2. 4c4703be9f

This repository contains
* .mrconfig
* mr-include/repo-[23].mr

where repo-2.mr has an additional *lib=...* defined.

##### First case
Looking at revision #1, the included files have repo-2.mr included 
first, which means that the *lib=some_text* is run for *mr up* commands:

```
mr update: /home/sandbox/repos/bbb
*****
*****  This worked
*****

mr update: /home/sandbox/repos/ggg

mr update: finished (2 ok)
```

In the second revision, we simply rename repo-3.mr to repo-1.mr so that 
it is imported first. The bug is triggered and the *lib = ...* is not 
included for the second and subsequent imports (it _is_ included for the 
first however, see *mr -v up* output).  Running *mr up*:

```
mr update: /home/sandbox/repos/bbb
sh: 45: some_text: not found

mr update: /home/sandbox/repos/ggg

mr update: finished (1 ok; 1 failed)
```


I don't know what the solution is.  Sorry.


-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-39-generic (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

--- End Message ---
--- Begin Message ---
This is not a bug. Your include file seems to assume that any
instance of "lib =" will be taken to be in the [DEFAULT] section.
But this is only the case if no other section has been opened. When
the other file is included first, it opens a new section, and the lib = 
is taken to be part of that section.

The fix is simple: If you want to define something in the [DEFAULT]
section in an include file, then tell it that:

[DEFAULT]
lib =
 some_text() {
  echo "*****"
  echo "*****  This worked"
  echo "*****"
 }

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to